public class JConstructor extends JMethod
HasName.UtilNULL_METHOD, signature| Constructor and Description |
|---|
JConstructor(SourceInfo info,
JClassType enclosingType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBePolymorphic()
Returns true if this method can participate in virtual dispatch.
|
JMethodBody |
getBody() |
JClassType |
getEnclosingType() |
JNonNullType |
getNewType() |
boolean |
isConstructor() |
boolean |
isEmpty()
Returns
true if this constructor does no real work. |
boolean |
needsVtable()
Returns
true if this method can participate in instance
dispatch. |
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
protected Object |
writeReplace() |
addOverride, addOverrides, addParam, addThrownException, addThrownExceptions, freezeParamTypes, getAccess, getExternalizedMethod, getName, getOriginalParamTypes, getOriginalReturnType, getOverrides, getParams, getSignature, getThrownExceptions, getType, isAbstract, isDefault, isExternal, isFinal, isNative, isPrivate, isStatic, isSynthetic, isTrace, removeParam, resolve, setAbstract, setBody, setFinal, setOriginalTypes, setSynthetic, setTrace, setType, traceAfter, traceBefore, visitChildrengetSourceInfo, setSourceInfo, toSource, toStringpublic JConstructor(SourceInfo info, JClassType enclosingType)
public boolean canBePolymorphic()
JMethodcanBePolymorphic in class JMethodpublic JMethodBody getBody()
public JClassType getEnclosingType()
getEnclosingType in interface HasEnclosingTypegetEnclosingType in class JMethodpublic JNonNullType getNewType()
public boolean isConstructor()
isConstructor in class JMethodpublic boolean isEmpty()
true if this constructor does no real work.
NOTE: this method does NOT account for any clinits that would be triggered
if this constructor is the target of a new instance operation from an
external class.
TODO(scottb): make this method less expensive by computing in an external
visitor.public boolean needsVtable()
JMethodtrue if this method can participate in instance
dispatch.needsVtable in class JMethodpublic void traverse(JVisitor visitor, Context ctx)
JVisitabletraverse in interface JVisitabletraverse in class JMethodvisitor - the visitor that should traverse this nodectx - the context of an existing traversalprotected Object writeReplace()
writeReplace in class JMethodCopyright © 2018. All rights reserved.