File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/org/geekden/servoy/ptk Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 2727import java .util .Map ;
2828import java .util .Set ;
2929
30+ import com .servoy .j2db .scripting .IConstantsObject ;
3031import com .servoy .j2db .scripting .IScriptObject ;
3132
3233/**
@@ -67,8 +68,8 @@ public abstract class AbstractScriptObject implements IScriptObject
6768
6869 private final Map <String , MethodInfo > methods =
6970 new HashMap <String , MethodInfo >();
70- private final Set < Class <? extends IScriptObject >> types =
71- new HashSet <Class <? extends IScriptObject > >();
71+ @ SuppressWarnings ( "rawtypes" )
72+ private final Set < Class > types = new HashSet <Class >();
7273
7374 private boolean annotatedMethodsRegistered = false ;
7475
@@ -99,6 +100,14 @@ public final boolean isDeprecated(String method)
99100 protected void register (Class <? extends IScriptObject > clazz )
100101 { types .add (clazz ); }
101102
103+ /**
104+ * Registers {@linkplain IConstantsObject constants}. Call from the constructor.
105+ *
106+ * @param clazz the IConstantsObject implementation to be exported.
107+ */
108+ protected void registerConstants (Class <? extends IConstantsObject > clazz )
109+ { types .add (clazz ); }
110+
102111 private void register (MethodInfo m )
103112 { methods .put (m .name (), m ); }
104113
You can’t perform that action at this time.
0 commit comments