Skip to content

Commit

Permalink
Changes by GitHub action (#17)
Browse files Browse the repository at this point in the history
* Update generated classes after commit fd9e620

* Added developed classes from JNet

* Added developed classes to replace generated one like in JNet

* Update java classes

---------

Co-authored-by: masesdevelopers <[email protected]>
  • Loading branch information
github-actions[bot] and masesdevelopers authored May 31, 2024
1 parent fd9e620 commit 48c3518
Show file tree
Hide file tree
Showing 146 changed files with 7,349 additions and 1,472 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

package org.mases.netdroid.developed.java.lang;

import org.mases.jcobridge.JCListener;
import org.mases.jcobridge.JCNativeException;
import org.mases.jcobridge.JCObject;

/**
* The {@link UncaughtExceptionHandler} class represents a generic implementation of
* {@link Thread.UncaughtExceptionHandler}
*/
public class UncaughtExceptionHandler extends JCListener implements Thread.UncaughtExceptionHandler {
public UncaughtExceptionHandler(String key) throws JCNativeException {
super(key);
}

/**
* Method invoked when the given thread terminates due to the given uncaught exception.
*/
public void uncaughtException(Thread t, Throwable e) {
raiseEvent("uncaughtException", t, e);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

package org.mases.netdroid.developed.java.util;

import org.mases.jcobridge.*;

import java.util.function.Function;
import java.util.function.ToDoubleFunction;
import java.util.function.ToIntFunction;
import java.util.function.ToLongFunction;

/**
* The {@link Comparator} class represents a generic implementation
* of {@link java.util.Comparator}
*/
public class Comparator extends JCListener implements java.util.Comparator {
public Comparator(String key) throws JCNativeException {
super(key);
}

public int compare(Object o1, Object o2) {
raiseEvent("compare", o1, o2);
Object returnVal = getReturnData();
return (int) returnVal;
}

@Override
public boolean equals(Object obj) {
raiseEvent("equals", obj);
Object returnVal = getReturnData();
return (boolean) returnVal;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

package org.mases.netdroid.developed.java.util;

public final class EventListener extends org.mases.jcobridge.JCListener implements java.util.EventListener {
public EventListener(String key) throws org.mases.jcobridge.JCNativeException {
super(key);
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

package org.mases.netdroid.developed.java.util.function;

import org.mases.jcobridge.*;

/**
* The {@link BiConsumer} class represents a generic implementation of
* {@link java.util.function.BiConsumer}
*/
public final class BiConsumer extends JCListener implements java.util.function.BiConsumer {
public BiConsumer(String key) throws JCNativeException {
super(key);
}

@Override
public void accept(Object e1, Object e2) {
raiseEvent("accept", e1, e2);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

package org.mases.netdroid.developed.java.util.function;

import org.mases.jcobridge.*;

/**
* The {@link BiFunction} class represents a generic implementation of
* {@link java.util.function.BiFunction}
*/
public final class BiFunction extends JCListener implements java.util.function.BiFunction {
public BiFunction(String key) throws JCNativeException {
super(key);
}

@Override
public Object apply(Object e1, Object e2) {
raiseEvent("apply", e1, e2);
Object retVal = getReturnData();
return retVal;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

package org.mases.netdroid.developed.java.util.function;

import org.mases.jcobridge.*;

/**
* The {@link BiPredicate} class represents a generic implementation of
* {@link java.util.function.BiPredicate}
*/
public final class BiPredicate extends JCListener implements java.util.function.BiPredicate {
public BiPredicate(String key) throws JCNativeException {
super(key);
}

@Override
public boolean test(Object e1, Object e2) {
raiseEvent("test", e1, e2);
Object retVal = getReturnData();
return (boolean) retVal;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

package org.mases.netdroid.developed.java.util.function;

import org.mases.jcobridge.*;

/**
* The {@link BinaryOperator} class represents a generic implementation of
* {@link java.util.function.BinaryOperator}
*/
public final class BinaryOperator extends JCListener implements java.util.function.BinaryOperator {
public BinaryOperator(String key) throws JCNativeException {
super(key);
}

@Override
public Object apply(Object e1, Object e2) {
raiseEvent("apply", e1, e2);
Object retVal = getReturnData();
return retVal;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

package org.mases.netdroid.developed.java.util.function;

import org.mases.jcobridge.*;

/**
* The {@link BooleanSupplier} class represents a generic implementation of
* {@link java.util.function.BooleanSupplier}
*/
public final class BooleanSupplier extends JCListener implements java.util.function.BooleanSupplier {
public BooleanSupplier(String key) throws JCNativeException {
super(key);
}

@Override
public boolean getAsBoolean() {
raiseEvent("getAsBoolean", null);
Object retVal = getReturnData();
return (boolean) retVal;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

package org.mases.netdroid.developed.java.util.function;

import org.mases.jcobridge.*;

/**
* The {@link Consumer} class represents a generic implementation of
* {@link java.util.function.Consumer}
*/
public final class Consumer extends JCListener implements java.util.function.Consumer {
public Consumer(String key) throws JCNativeException {
super(key);
}

@Override
public void accept(Object e) {
raiseEvent("accept", e);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/

package org.mases.netdroid.developed.java.util.function;

import org.mases.jcobridge.*;

/**
* The {@link DoubleBinaryOperator} class represents a generic implementation of
* {@link java.util.function.DoubleBinaryOperator}
*/
public final class DoubleBinaryOperator extends JCListener implements java.util.function.DoubleBinaryOperator {
public DoubleBinaryOperator(String key) throws JCNativeException {
super(key);
}

@Override
public double applyAsDouble(double e1, double e2) {
raiseEvent("applyAsDouble", e1, e2);
Object retVal = getReturnData();
return (double) retVal;
}
}
Loading

0 comments on commit 48c3518

Please sign in to comment.