Modifier and Type | Field and Description |
---|---|
static short |
TYPE_ALL |
static short |
TYPE_BOOLEAN |
static short |
TYPE_NUMERIC |
static short |
TYPE_STRING |
Constructor and Description |
---|
ASMUtil() |
Modifier and Type | Method and Description |
---|---|
static Literal |
cachedWithinValue(Expression val) |
static boolean |
containsComponent(Body body) |
static int |
count(List<Statement> statements,
boolean recursive) |
static int |
count(Statement s,
boolean recursive) |
static void |
createEmptyArray(org.objectweb.asm.commons.GeneratorAdapter adapter) |
static void |
createEmptyStruct(org.objectweb.asm.commons.GeneratorAdapter adapter) |
static String |
createMD5(ASMProperty[] props) |
static String |
createOverfowMethod(String prefix,
int id) |
static byte[] |
createPojo(String className,
ASMProperty[] properties,
Class parent,
Class[] interfaces,
String srcName) |
static String |
display(ExprString name) |
static void |
dummy1(BytecodeContext bc) |
static void |
dummy2(BytecodeContext bc) |
static void |
dump(Statement s,
int level) |
static FlowControlBreak |
getAncestorBreakFCStatement(Statement stat,
List<FlowControlFinal> finallyLabels,
String label) |
static Tag |
getAncestorComponent(Statement stat) |
static FlowControlContinue |
getAncestorContinueFCStatement(Statement stat,
List<FlowControlFinal> finallyLabels,
String label) |
static Page |
getAncestorPage(Statement stat) |
static Page |
getAncestorPage(Statement stat,
Page defaultValue) |
static FlowControlRetry |
getAncestorRetryFCStatement(Statement stat,
List<FlowControlFinal> finallyLabels,
String label) |
static Tag |
getAncestorTag(Tag tag,
String fullName)
Gibt ein uebergeordnetes Tag mit dem uebergebenen Full-Name (Namespace und Name) zurueck,
falls ein solches existiert, andernfalls wird null zurueckgegeben.
|
static Statement |
getAncestorTryStatement(Statement stat) |
static Boolean |
getAttributeBoolean(Tag tag,
String attrName)
extract the content of a attribut
|
static Boolean |
getAttributeBoolean(Tag tag,
String attrName,
Boolean defaultValue)
extract the content of a attribut
|
static Literal |
getAttributeLiteral(Tag tag,
String attrName)
extract the content of a attribut
|
static Literal |
getAttributeLiteral(Tag tag,
String attrName,
Literal defaultValue)
extract the content of a attribut
|
static String |
getAttributeString(Tag tag,
String attrName)
extract the content of a attribut
|
static String |
getAttributeString(Tag tag,
String attrName,
String defaultValue)
extract the content of a attribut
|
static String |
getClassName(byte[] barr) |
static String |
getClassName(Resource res) |
static org.objectweb.asm.ClassWriter |
getClassWriter() |
static String |
getId() |
static Tag |
getParentTag(Tag tag)
Gibt das uebergeordnete CFXD Tag Element zurueck, falls dies nicht existiert wird null zurueckgegeben.
|
static Statement |
getRoot(Statement stat) |
static SourceNameClassVisitor.SourceInfo |
getSourceInfo(Config config,
Class clazz,
boolean onlyCFC) |
static Class |
getValueTypeClass(org.objectweb.asm.Type type,
Class defaultValue) |
static boolean |
hasAncestorBreakFCStatement(Statement stat,
String label) |
static boolean |
hasAncestorContinueFCStatement(Statement stat,
String label) |
static boolean |
hasAncestorRetryFCStatement(Statement stat,
String label) |
static boolean |
hasAncestorTag(Tag tag,
String fullName)
Gibt zurueck ob das direkt uebergeordnete Tag mit dem uebergebenen Full-Name (Namespace und Name) existiert.
|
static boolean |
hasAncestorTryStatement(Statement stat) |
static boolean |
hasOnlyDataMembers(Variable var) |
static boolean |
hasSisterTagAfter(Tag tag,
String nameToFind)
Prueft ob das das angegebene Tag in der gleichen Ebene nach dem angegebenen Tag vorkommt.
|
static boolean |
hasSisterTagWithSameName(Tag tag)
Prueft ob das angegebene Tag innerhalb seiner Ebene einmalig ist oder nicht.
|
static void |
invokeMethod(org.objectweb.asm.commons.GeneratorAdapter adapter,
org.objectweb.asm.Type type,
org.objectweb.asm.commons.Method method) |
static boolean |
isCFC(Statement s) |
static boolean |
isDotKey(ExprString expr) |
static boolean |
isEmpty(Body body) |
static boolean |
isLiteralAttribute(Tag tag,
Attribute attr,
short type,
boolean required,
boolean throwWhenNot) |
static boolean |
isLiteralAttribute(Tag tag,
String attrName,
short type,
boolean required,
boolean throwWhenNot) |
static boolean |
isNull(Expression expr) |
static boolean |
isOverfowMethod(String name) |
static boolean |
isParentTag(Tag tag,
Class clazz) |
static boolean |
isParentTag(Tag tag,
String fullName) |
static boolean |
isRefType(org.objectweb.asm.Type type) |
static boolean |
isRoot(Statement statement) |
static void |
leadFlow(BytecodeContext bc,
Statement stat,
int flowType,
String label) |
static void |
listAncestor(Statement stat) |
static int |
loadFor(org.objectweb.asm.Type type) |
static void |
pop(org.objectweb.asm.commons.GeneratorAdapter adapter,
Expression expr,
int mode) |
static void |
pop(org.objectweb.asm.commons.GeneratorAdapter adapter,
org.objectweb.asm.Type type) |
static void |
remove(Tag tag)
remove this tag from his parent body
|
static void |
removeLiterlChildren(Tag tag,
boolean recursive) |
static void |
replace(Tag src,
Tag trg,
boolean moveBody)
replace src with trg
|
static void |
size(org.objectweb.asm.ClassWriter cw) |
static int |
sizeOf(org.objectweb.asm.Type type) |
static ASMProperty[] |
toASMProperties(Property[] properties) |
static Boolean |
toBoolean(Attribute attr,
int line,
Boolean defaultValue) |
static Boolean |
toBoolean(Attribute attr,
Position start) |
static org.objectweb.asm.Type |
toRefType(org.objectweb.asm.Type type) |
static String |
toString(Expression exp) |
static String |
toString(Expression exp,
String defaultValue) |
static org.objectweb.asm.Type |
toType(Class type,
boolean axistype)
translate a string cfml type definition to a Type Object
|
static org.objectweb.asm.Type |
toType(String cfType,
boolean axistype)
translate a string cfml type definition to a Type Object
|
static org.objectweb.asm.Type[] |
toTypes(Class<?>[] classes)
convert a clas array to a type array
|
static org.objectweb.asm.Type |
toValueType(org.objectweb.asm.Type type)
return value type only when there is one
|
static void |
visitLabel(org.objectweb.asm.commons.GeneratorAdapter ga,
org.objectweb.asm.Label label) |
public static final short TYPE_ALL
public static final short TYPE_BOOLEAN
public static final short TYPE_NUMERIC
public static final short TYPE_STRING
public ASMUtil()
public static boolean hasAncestorTag(Tag tag, String fullName)
el
- Startelement, von wo aus gesucht werden soll.fullName
- Name des gesuchten Tags.public static Tag getParentTag(Tag tag)
el
- Element von dem das parent Element zurueckgegeben werden soll.public static boolean isParentTag(Tag tag, String fullName)
public static boolean isParentTag(Tag tag, Class clazz)
public static boolean hasAncestorRetryFCStatement(Statement stat, String label)
public static boolean hasAncestorBreakFCStatement(Statement stat, String label)
public static boolean hasAncestorContinueFCStatement(Statement stat, String label)
public static FlowControlRetry getAncestorRetryFCStatement(Statement stat, List<FlowControlFinal> finallyLabels, String label)
public static FlowControlBreak getAncestorBreakFCStatement(Statement stat, List<FlowControlFinal> finallyLabels, String label)
public static FlowControlContinue getAncestorContinueFCStatement(Statement stat, List<FlowControlFinal> finallyLabels, String label)
public static void leadFlow(BytecodeContext bc, Statement stat, int flowType, String label) throws BytecodeException
BytecodeException
public static boolean hasAncestorTryStatement(Statement stat)
public static Statement getAncestorTryStatement(Statement stat)
public static Tag getAncestorTag(Tag tag, String fullName)
el
- Startelement, von wo aus gesucht werden soll.fullName
- Name des gesuchten Tags.public static Boolean getAttributeBoolean(Tag tag, String attrName) throws EvaluatorException
cfxdTag
- attrName
- EvaluatorException
public static Boolean getAttributeBoolean(Tag tag, String attrName, Boolean defaultValue)
cfxdTag
- attrName
- EvaluatorException
public static String getAttributeString(Tag tag, String attrName) throws EvaluatorException
cfxdTag
- attrName
- EvaluatorException
public static String getAttributeString(Tag tag, String attrName, String defaultValue)
cfxdTag
- attrName
- EvaluatorException
public static Literal getAttributeLiteral(Tag tag, String attrName) throws EvaluatorException
cfxdTag
- attrName
- EvaluatorException
public static Literal getAttributeLiteral(Tag tag, String attrName, Literal defaultValue)
cfxdTag
- attrName
- EvaluatorException
public static boolean hasSisterTagAfter(Tag tag, String nameToFind)
tag
- Ausgangspunkt, nach diesem tag darf das angegebene nicht vorkommen.nameToFind
- Tag Name der nicht vorkommen darfpublic static boolean hasSisterTagWithSameName(Tag tag)
tag
- Ausgangspunkt, nach diesem tag darf das angegebene nicht vorkommen.public static void replace(Tag src, Tag trg, boolean moveBody)
src
- trg
- public static Page getAncestorPage(Statement stat) throws BytecodeException
BytecodeException
public static Page getAncestorPage(Statement stat, Page defaultValue)
public static void listAncestor(Statement stat)
public static Tag getAncestorComponent(Statement stat) throws BytecodeException
BytecodeException
public static void invokeMethod(org.objectweb.asm.commons.GeneratorAdapter adapter, org.objectweb.asm.Type type, org.objectweb.asm.commons.Method method)
public static byte[] createPojo(String className, ASMProperty[] properties, Class parent, Class[] interfaces, String srcName) throws PageException
PageException
public static int loadFor(org.objectweb.asm.Type type)
public static int sizeOf(org.objectweb.asm.Type type)
public static org.objectweb.asm.Type toType(String cfType, boolean axistype) throws PageException
cfType
- axistype
- PageException
public static org.objectweb.asm.Type toType(Class type, boolean axistype)
cfType
- axistype
- PageException
public static String createMD5(ASMProperty[] props)
public static void removeLiterlChildren(Tag tag, boolean recursive)
public static void pop(org.objectweb.asm.commons.GeneratorAdapter adapter, Expression expr, int mode)
adapter
- expr
- mode
- public static void pop(org.objectweb.asm.commons.GeneratorAdapter adapter, org.objectweb.asm.Type type)
public static org.objectweb.asm.ClassWriter getClassWriter()
public static String createOverfowMethod(String prefix, int id)
public static boolean isOverfowMethod(String name)
public static boolean isDotKey(ExprString expr)
public static String toString(Expression exp, String defaultValue)
public static String toString(Expression exp) throws BytecodeException
BytecodeException
public static Boolean toBoolean(Attribute attr, Position start) throws BytecodeException
BytecodeException
public static boolean isLiteralAttribute(Tag tag, String attrName, short type, boolean required, boolean throwWhenNot) throws EvaluatorException
EvaluatorException
public static boolean isLiteralAttribute(Tag tag, Attribute attr, short type, boolean required, boolean throwWhenNot) throws EvaluatorException
EvaluatorException
public static boolean isNull(Expression expr)
public static boolean isRefType(org.objectweb.asm.Type type)
public static org.objectweb.asm.Type toRefType(org.objectweb.asm.Type type)
public static org.objectweb.asm.Type toValueType(org.objectweb.asm.Type type)
type
- public static Class getValueTypeClass(org.objectweb.asm.Type type, Class defaultValue)
public static ASMProperty[] toASMProperties(Property[] properties)
public static boolean containsComponent(Body body)
public static void dummy1(BytecodeContext bc)
public static void dummy2(BytecodeContext bc)
public static org.objectweb.asm.Type[] toTypes(Class<?>[] classes)
classes
- public static String display(ExprString name)
public static Literal cachedWithinValue(Expression val) throws EvaluatorException
EvaluatorException
public static void visitLabel(org.objectweb.asm.commons.GeneratorAdapter ga, org.objectweb.asm.Label label)
public static String getClassName(Resource res) throws IOException
IOException
public static String getClassName(byte[] barr)
public static SourceNameClassVisitor.SourceInfo getSourceInfo(Config config, Class clazz, boolean onlyCFC) throws IOException
IOException
public static boolean hasOnlyDataMembers(Variable var)
public static void size(org.objectweb.asm.ClassWriter cw)
public static void createEmptyStruct(org.objectweb.asm.commons.GeneratorAdapter adapter)
public static void createEmptyArray(org.objectweb.asm.commons.GeneratorAdapter adapter)
Copyright © 2015 Lucee