tudresden.ocl.injection
Class JavaConstructor
java.lang.Object
tudresden.ocl.injection.JavaFeature
tudresden.ocl.injection.JavaBehaviour
tudresden.ocl.injection.JavaConstructor
- public final class JavaConstructor
- extends JavaBehaviour
Represents a constructor of a class parsed by the java parser.
- See Also:
Injector
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
last_param_start
private int last_param_start
- The index of the start of the last parameter of the
parameter list in
JavaBehaviour.literal.
Is the index of the last comma, if there is more than one
parameter or otherwise the index after the opening parent.
Needed for getWrappedLiteral(),
if this IS a constructor.
Is initialized to -1.
last_param_end
private int last_param_end
- The index of the end of the last parameter of the
parameter list in
JavaBehaviour.literal.
Is the index of the closing bracket of the parameter list.
Needed for getWrappedLiteral(),
if this IS a constructor.
Is initialized to -1.
is_wrapped
private boolean is_wrapped
JavaConstructor
public JavaConstructor(JavaClass parent,
int modifiers,
String name)
throws InjectorParseException
addParameter
public final void addParameter(String paramtype,
String paramname)
- Overrides:
addParameter in class JavaBehaviour
getWrappedLiteral
public final String getWrappedLiteral()
- Specified by:
getWrappedLiteral in class JavaBehaviour
setLiteral
public final void setLiteral(String literal)
- Overrides:
setLiteral in class JavaBehaviour
setLastParameterStart
public final void setLastParameterStart(int pos)
- Sets
last_param_start to the given value.
- Overrides:
setLastParameterStart in class JavaBehaviour
- Throws:
RuntimeException - if pos is negative.- See Also:
setLastParameterStart(int)
setLastParameterEnd
public final void setLastParameterEnd(int pos)
- Sets
last_param_end to the given value.
- Overrides:
setLastParameterEnd in class JavaBehaviour
- Throws:
RuntimeException - if pos is negative.
RuntimeException - if called more than once.- See Also:
setLastParameterEnd(int)
getAllowedModifiers
public final int getAllowedModifiers()
- See Java Language Specification 8.6.3
"Constructor Modifiers"
- Specified by:
getAllowedModifiers in class JavaFeature
printMore
public final void printMore(PrintStream o)
- Overrides:
printMore in class JavaBehaviour
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.