本文整理汇总了Java中org.aikodi.chameleon.core.property.StaticChameleonProperty类的典型用法代码示例。如果您正苦于以下问题:Java StaticChameleonProperty类的具体用法?Java StaticChameleonProperty怎么用?Java StaticChameleonProperty使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StaticChameleonProperty类属于org.aikodi.chameleon.core.property包,在下文中一共展示了StaticChameleonProperty类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Java7
import org.aikodi.chameleon.core.property.StaticChameleonProperty; //导入依赖的package包/类
protected Java7(String name, LookupContextFactory lookupFactory,Revision version) {
super(name, lookupFactory, version);
STRICTFP = add(new StaticChameleonProperty("strictfp", Declaration.class));
SYNCHRONIZED = add(new StaticChameleonProperty("synchronized", Method.class));
TRANSIENT = add(new StaticChameleonProperty("transient", Variable.class));
VOLATILE = add(new StaticChameleonProperty("volatile", Variable.class));
IMPLEMENTS_RELATION = add(new StaticChameleonProperty("implements", AbstractInheritanceRelation.class));
PROTECTED = add(new ProtectedProperty(SCOPE_MUTEX));
PRIVATE = add(new PrivateProperty(SCOPE_MUTEX));
PUBLIC = add(new PublicProperty(SCOPE_MUTEX));
PACKAGE_ACCESSIBLE = add(new PackageProperty(SCOPE_MUTEX));
PRIMITIVE_TYPE = add(new PrimitiveTypeProperty("primitive"));
NUMERIC_TYPE = add(new NumericTypeProperty("numeric"));
REFERENCE_TYPE = PRIMITIVE_TYPE.inverse();
UNBOXABLE_TYPE = add(new UnboxableTypeProperty("unboxable"));
ANNOTATION_TYPE = add(new StaticChameleonProperty("annotation", Type.class));
DEFAULT = add(new StaticChameleonProperty("default", Method.class));
DEFAULT.addContradiction(ABSTRACT);
// In Java, a constructor is a class method
// CONSTRUCTOR.addImplication(CLASS);
// In Java, constructors are not inheritable
CONSTRUCTOR.addImplication(INHERITABLE.inverse());
// A numeric type is a primitive type
NUMERIC_TYPE.addImplication(PRIMITIVE_TYPE);
INHERITABLE.addValidElementType(VariableDeclarator.class);
PRIVATE.addValidElementType(VariableDeclarator.class);
PUBLIC.addValidElementType(VariableDeclarator.class);
PROTECTED.addValidElementType(VariableDeclarator.class);
OVERRIDABLE.addValidElementType(VariableDeclarator.class);
DEFINED.addValidElementType(VariableDeclarator.class);
REFINABLE.addValidElementType(MemberVariableDeclarator.class);
FINAL.addValidElementType(MemberVariableDeclarator.class);
TYPE_WITH_VALUE_SEMANTICS = add(new ValueClass());
TYPE_WITH_REFERENCE_SEMANTICS = TYPE_WITH_VALUE_SEMANTICS.inverse();
for(String string: new String[]{"==","!=","+","++","-","--","*","/","+=","-=","*=","/=","&","&&","|","||","^","!","&=","|=","^=","<<=",">>=",">>>+","%","<",">","<=",">=","%=","<<",">>",">>>"}) {
_operatorNames.add(string);
}
initNameMaps();
}