Examples of TypeStore


Examples of org.eclipse.imp.pdb.facts.type.TypeStore

      }
    });
  }

  private static TypeStore constructCompleteTypeStore(Environment env) {
      TypeStore complete = new TypeStore();
      ModuleEnvironment mod = (ModuleEnvironment) env.getRoot();
    constructCompleteTypeStoreRec(complete, mod, new HashSet<java.lang.String>());
    return complete;
  }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.TypeStore

//    return null;
//  }

  // REFLECT -- copy in PreludeCompiled
  public IValue implode(IValue reifiedType, IConstructor tree, IEvaluatorContext ctx) {
    TypeStore store = new TypeStore();
    Type type = tr.valueToType((IConstructor) reifiedType, store);
    try {
      IValue result = implode(store, type, tree, false, ctx);
      if (isUntypedNodeType(type) && !type.isTop() && (TreeAdapter.isList(tree) || TreeAdapter.isOpt(tree))) {
        // Ensure the result is actually a node, even though
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.TypeStore

 
  // REFLECT -- copy in PreludeCompiled
  public IValue readBinaryValueFile(IValue type, ISourceLocation loc, IEvaluatorContext ctx){
   
//    TypeStore store = ctx.getCurrentEnvt().getStore();
    TypeStore store = new TypeStore();
   
// TODO: commented out the following lines and that seems to sove the duplicate declaration of ParseTree.
//     Why was this import here? Can someone check?
   
//    ModuleEnvironment pt = ctx.getHeap().getModule("ParseTree");
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.TypeStore

 
  // REFLECT -- copy in PreludeCompiled
  public IValue readTextValueFile(IValue type, ISourceLocation loc, IEvaluatorContext ctx){
    loc = ctx.getHeap().resolveSourceLocation(loc);
   
      TypeStore store = new TypeStore();
    Type start = tr.valueToType((IConstructor) type, store);
   
    InputStream in = null;
    try{
      in = new BufferedInputStream(ctx.getResolverRegistry().getInputStream(loc.getURI()));
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.TypeStore

  }
 
  // REFLECT -- copy in PreludeCompiled
  public IValue readTextValueString(IValue type, IString input, IEvaluatorContext ctx) {
//    TypeStore store = ctx.getCurrentEnvt().getStore();
    TypeStore store = new TypeStore();
    ModuleEnvironment pt = ctx.getHeap().getModule("ParseTree");
    if(pt != null){
      store.importStore(pt.getStore());
    }
    Type start = tr.valueToType((IConstructor) type, store);
   
    StringReader in = new StringReader(input.getValue());
    try {
View Full Code Here

Examples of org.jboss.weld.metadata.TypeStore

    class CustomInjectionPoint implements InjectionPoint {
        private final EnhancedAnnotatedField<CustomWindowFrame, ?> windowField;

        public CustomInjectionPoint() {
            TypeStore ts = new TypeStore();
            ClassTransformer transformer = new ClassTransformer(ts, new SharedObjectCache(), ReflectionCacheFactory.newInstance(ts), RegistrySingletonProvider.STATIC_INSTANCE);
            EnhancedAnnotatedType<?> targetClass = transformer.getEnhancedAnnotatedType(CustomWindowFrame.class, AnnotatedTypeIdentifier.NULL_BDA_ID);
            windowField = targetClass.getDeclaredEnhancedField("window");
        }
View Full Code Here

Examples of org.jboss.weld.metadata.TypeStore

   }


    @Test
    public void testInterceptorModel() {
        TypeStore typeStore = new TypeStore();
        InterceptorBindingModel<SecondaryInterceptionBinding> interceptorBindingModel
                = new InterceptorBindingModel<SecondaryInterceptionBinding>(new ClassTransformer(typeStore, new SharedObjectCache(), ReflectionCacheFactory.newInstance(typeStore), RegistrySingletonProvider.STATIC_INSTANCE).getEnhancedAnnotation(SecondaryInterceptionBinding.class));
        Set<Annotation> annotations = interceptorBindingModel.getInheritedInterceptionBindingTypes();
        assert annotations.size() != 0;
    }
View Full Code Here

Examples of org.jboss.weld.metadata.TypeStore

   /*
    * description = "WELD-568"
    */
    @Test
    public void testWeldClassForGenericSuperclass() {
        TypeStore ts = new TypeStore();
        EnhancedAnnotatedType<StringProcessor> weldClass = new ClassTransformer(ts, new SharedObjectCache(), ReflectionCacheFactory.newInstance(ts), RegistrySingletonProvider.STATIC_INSTANCE).getEnhancedAnnotatedType(StringProcessor.class, AnnotatedTypeIdentifier.NULL_BDA_ID);
        Collection<EnhancedAnnotatedMethod<?, ? super StringProcessor>> methods = weldClass.getEnhancedMethods();
        //assert methods.size() == 2;
        List<EnhancedAnnotatedMethod<?, ?>> interceptableMethods = Beans.getInterceptableMethods(weldClass);
        Assert.assertEquals(3, interceptableMethods.size());
View Full Code Here

Examples of org.jboss.weld.metadata.TypeStore

    @BeforeMethod
    public void beforeMethod() {
        BeanIdentifierIndex beanIdentifierIndex = new BeanIdentifierIndex();
        beanIdentifierIndex.build(Collections.<Bean<?>>emptySet());
        this.typeStore = new TypeStore();
        this.classTransformer = new ClassTransformer(typeStore, new SharedObjectCache(), ReflectionCacheFactory.newInstance(typeStore), RegistrySingletonProvider.STATIC_INSTANCE);
        this.services = new SimpleServiceRegistry();
        this.services.add(MetaAnnotationStore.class, new MetaAnnotationStore(classTransformer));
        this.services.add(ContextualStore.class, new ContextualStoreImpl(STATIC_INSTANCE, beanIdentifierIndex));
        this.services.add(ClassTransformer.class, classTransformer);
View Full Code Here

Examples of org.jboss.weld.metadata.TypeStore

     * tests the AnnotatedTypes.compareAnnotatedTypes
     */
    @Test
    public void testComparison() throws SecurityException, NoSuchFieldException, NoSuchMethodException {
        //check that two weld classes on the same underlying are equal
        TypeStore ts = new TypeStore();
        ClassTransformer ct = new ClassTransformer(ts, new SharedObjectCache(), ReflectionCacheFactory.newInstance(ts), RegistrySingletonProvider.STATIC_INSTANCE);
        EnhancedAnnotatedType<Chair> chair1 = EnhancedAnnotatedTypeImpl.of(BackedAnnotatedType.of(Chair.class, ct.getSharedObjectCache(), ct.getReflectionCache(), RegistrySingletonProvider.STATIC_INSTANCE, AnnotatedTypeIdentifier.NULL_BDA_ID), ct);
        EnhancedAnnotatedType<Chair> chair2 = EnhancedAnnotatedTypeImpl.of(BackedAnnotatedType.of(Chair.class, ct.getSharedObjectCache(), ct.getReflectionCache(), RegistrySingletonProvider.STATIC_INSTANCE, AnnotatedTypeIdentifier.NULL_BDA_ID), ct);
        Assert.assertTrue(AnnotatedTypes.compareAnnotatedTypes(chair1, chair2));

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.