1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
/**
* Copyright (c) 2004-2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* IBM - Initial API and implementation
*/
// line comment1
/**
* A javadoc
*/
package org.eclipse.emf.test.examples;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.eclipse.emf.common.*;
import org.eclipse.emf.common.notify.Notification;
// This is importing the EObjectImpl
import org.eclipse.emf.ecore.impl.EObjectImpl;
class AnotherClass<T>
{
}
/**
* This is an example of a fairly complete Java file.
* Its content is not really important
*
* @author EMF team
* @generated
* @generated NOT
*/
public class Example1 extends EObjectImpl
{
// A public inner class. It is indented with TABs
public abstract class InnerClass<K extends Number>
implements Notification, org.eclipse.emf.common.notify.Notifier
{
}
// An initializer. It is indented with TABs
{
System.out.println("A initializer with Comments");
}
/**
* public String constant.
*/
public static final String STR_CONST = "something is ; different \"//; /*;*/" /*inte;res;ting*/ + " !!;;" ; // = "original text";
/*
* A private static inner interface
*/
private static interface InnerInterface<N> extends Notification, List<List<Number>>
{
}
/**
* protected static long field.
* This is a multiline comment.
*/
protected static long longStatic=1l; //A field
/*
* package protected boolean field.
*/
Boolean booleanInstance;
private Map.Entry<String, Object> myEntry;
/**
* An static initializer
*/
static
{
System.out.println("A initializer with JavaDoc - line1");
System.out.println("A initializer with JavaDoc - line2");
}
/**
* This is a contructor
*/
public Example1()
{
super();
}
private Example1(String aString, boolean bol)
{
super();
}
/**
* Sets the boolean instance.
* @param b
* @generated
*/
public <X extends Exception> void setBooleanInstance(Boolean b) throws X
{
if (b != null)
{
booleanInstance = b;
}
else
{
booleanInstance = Boolean.FALSE;
}
}
@Deprecated
void setBooleanInstance(int a)
{
setBooleanInstance(a > 0 ? Boolean.TRUE : Boolean.FALSE);
}
private int[][] myMatrix =new int[4][5];
/**
* Gets the boolean instance. Now I will ask you to see
* something {@link EObjectImpl#eAdapters()}.
* @param b
* @generated NOT
*/
public <K> Boolean getBooleanInstance(Class<K> aClass) throws Exception
{
return booleanInstance == null ? Boolean.FALSE : booleanInstance;
}
/*
* This method returns an empty list.
*/
protected List<?> aMethodWithComments() throws RuntimeException, IllegalAccessError, java.lang.NullPointerException
{
return Collections.EMPTY_LIST;
}
// This is a simple comment
//This is another simple comment
private static long[][] aMethodWithNoComments(int[] a)
{
System.out.println("I don't do anything");
return null;
}
/**
* Another initializer with 2 lines
* of javadoc.
*/
{
System.out.println("Another initializer with JavaDoc");
}
public int a = 1, b = 2, c = 3;
float[][] floatArray[][];
}
|